package com.atguigu.tingshu.album.service.impl;

import com.atguigu.tingshu.album.mapper.BaseAttributeMapper;
import com.atguigu.tingshu.album.service.BaseAttributeService;
import com.atguigu.tingshu.common.config.cache.GuiGuCache;
import com.atguigu.tingshu.model.album.BaseAttribute;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseAttributeServiceImpl extends ServiceImpl<BaseAttributeMapper, BaseAttribute> implements BaseAttributeService {
    @Autowired
    private BaseAttributeMapper baseAttributeMapper;

    @Override
    @GuiGuCache(prefix = "category1Id:attributes:")
    public List<BaseAttribute> getAttributesByCategory1Id(Long categoryId) {

        return baseAttributeMapper.getAttributesByCategory1Id(categoryId);
    }
}
